package com.wulian.service.impl;

import com.wulian.dao.RegisterDao;
import com.wulian.entities.Register;
import com.wulian.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RegisterServiceImpl implements RegisterService {

    @Resource
    private RegisterDao registerDao ;

    @Override
    public void addRegister(Register register) {
        registerDao.addRegister(register);
    }

    @Override
    public void updateRegister(int id) {
        registerDao.updateRegister(id);
    }

    @Override
    public Register selRegister(int id) {
        return registerDao.selRegister(id);
    }

    @Override
    public List<Register> selAllRegister(int id) {
        return registerDao.selAllRegister(id);
    }

    @Override
    public List<Register> getAllByPage(Integer num, Integer size) {
        return registerDao.getAllByPage(num, size);
    }

    @Override
    public void delAllRegister() {
        registerDao.delAllRegister();
    }
}
